﻿@{
    ViewBag.Title = "Form";
    Layout = "~/Views/Shared/_Form.cshtml";
}

<script>
    var keyValue = $.request("keyValue");
    $(function () {
        initControl();
        $.ajax({
            url: "/SystemManage/User/GetFormJson",
            data: { keyValue: keyValue },
            dataType: "json",
            async: false,
            success: function (data) {
                $("#form1").formSerialize(data);
                $("#form1").find('.form-control,select,input').attr('readonly', 'readonly');
                $("#form1").find('div.ckbox label').attr('for', '');
            }
        });
    });
    function initControl() {
        $('#wizard').wizard().on('change', function (e, data) {
            var $next = $("#btn_next");
            if (data.direction == "next") {
                switch (data.step) {
                    case 1:
                        $next.attr('disabled');
                        break;
                    default:
                        break;
                    }
            } 
        });
        //$("#rolelist").treeview({
        //    height: 444,
        //    showcheck: true,
        //    url: "/SystemManage/User/getRolelist",
        //    param: { userId: keyValue }
        //});
        //$("#grouplist").treeview({
        //    height: 444,
        //    showcheck: true,
        //    url: "/SystemManage/User/getGrouplist",
        //    param: { userid: keyValue }
        //});


    }
</script>

<form id="form1">
   @* <div class="widget-body">
        <div id="wizard" class="wizard" data-target="#wizard-steps" style="border-left: none; border-top: none; border-right: none;">
             <ul class="nav nav-tabs">
            <li class="active"><a href="#">基本信息</a></li>
        </ul>
        </div>*@
@*        <div class="step-content" id="wizard-steps" style="border-left: none; border-bottom: none; border-right: none;">*@
            <div style="padding-top: 20px; margin-right: 30px;">
                <table class="form">
                    <tr>
                        <th class="formTitle">姓名</th>
                        <td class="formValue">
                            <input id="username" name="username" type="text" class="form-control required"  />
                        </td>
                    </tr>
                    <tr>
                        <th class="formTitle">密码</th>
                        <td class="formValue">
                           <input id="password" name="password" type="password" class="form-control required" />
                        </td>
                    </tr>
                   <tr>
                        <th class="formTitle">角色</th>
                        <td class="formValue">
                           <input id="rolelist" name="rolelist" type="text" class="form-control required" />
                        </td>
                    </tr>
                   <tr>
                        <th class="formTitle">分组</th>
                        <td class="formValue">
                           <input id="grouplist" name="grouplist" type="text" class="form-control required" />
                        </td>
                    </tr>
                   
                </table>
            </div>
           @* <div class="step-pane" id="step-2">
                <div id="rolelist"></div>
            </div>*@
            @* <div class="step-pane" id="step-3">
                <div id="grouplist"></div>
            </div>*@
       @* </div>*@
       @* <div class="form-button" id="wizard-actions">
            <a id="btn_last" disabled class="btn btn-default btn-prev">上一步</a>
            <a id="btn_next" class="btn btn-default btn-next">下一步</a>
        </div>*@
    @*</div>*@
</form>




